/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package players;

import java.util.ArrayList;
import java.util.Random;

/**
 *
 * @author theworldiwant
 */
public class RandPlayer extends Player {
     
    
    public boolean isgetCard(){ // n is score
        boolean willGet = false;
        Random rand = new Random();
        int num = 1+rand.nextInt(100); //num from 1-100
        
        switch(score%10){
            
            case 0: willGet = true;
                break;
                
            case 1: if(num >= 1 && num <=90)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 2: if(num >= 1 && num <=70)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 3: if(num >= 1 && num <=60)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 4: if(num >= 1 && num <=50)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 5: if(num >= 1 && num <=40)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 6: if(num >= 1 && num <=30)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 7: if(num >= 1 && num <=20)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
            case 8: if(num >= 1 && num <=10)
                    willGet = true;
            
                    else
                    willGet = false;
                break;
                
        }
        askForThird =willGet;
        return willGet;
    }
     
}
